libxl/arm: Fix build on arm64 + acpi w/ gcc 8.2
authorChristopher Clark <christopher.w.clark@gmail.com>
Thu, 16 Aug 2018 20:22:41 +0000 (13:22 -0700)
committerIan Jackson <ian.jackson@citrix.com>
Thu, 28 Feb 2019 16:14:15 +0000 (16:14 +0000)
commit7e730f966f71779d70cd9b98c6e3466768d66be7
tree50630eeeff8b9b26731b670e5ce3cadd7774f10a
parent8f57787a21c514d8144929024c9ccc8b8a823c03
libxl/arm: Fix build on arm64 + acpi w/ gcc 8.2

Add zero-padding to #defined ACPI table strings that are copied.
Provides sufficient characters to satisfy the length required to
fully populate the destination and prevent array-bounds warnings.
Add BUILD_BUG_ON sizeof checks for compile-time length checking.

Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
(cherry picked from commit b8f33431f3dd23fb43a879f4bdb4283fdc9465ad)
tools/libxl/libxl_arm_acpi.c